package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class InitRange implements Sequenceable, Serializable  {
    @SerializedName("start")
    private String start;
    @SerializedName("end")
    private String end;

    public static final Sequenceable.Producer<InitRange> CREATOR = new Producer<InitRange>() {
        @Override
        public InitRange createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            InitRange initRange = new InitRange();
            initRange.unmarshalling(parcel);
            return initRange;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.start);
        parcel.writeString(this.end);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.start=parcel.readString();
        this.end=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "InitRange{" +
                "start = '" + start + '\'' +
                ",end = '" + end + '\'' +
                "}";
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }
}
